using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VPRKOPF
    {
        public DataRow Convert2PRKOPF(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryPRKOPF(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["PRMANDANT"] = " ".PadRight(2 ); 
         dwReturn["PRKOLL"] = " ".PadRight(5 ); 
         dwReturn["PRPRGRP"] = " ".PadRight(8 ); 
         dwReturn["PRLFDNR"] = " ".PadRight(3 ); 
         dwReturn["PRAENDZL"] = " ".PadRight(0 ); 
         dwReturn["PRAENDBEN"] = " ".PadRight(8 ); 
         dwReturn["PRAENDDAT"] = " ".PadRight(0 ); 
         dwReturn["PRNEUBEN"] = " ".PadRight(8 ); 
         dwReturn["PRNEUDAT"] = " ".PadRight(0 ); 
         dwReturn["PRGDATVON"] = " ".PadRight(0 ); 
         dwReturn["PRGDATBIS"] = " ".PadRight(0 ); 
         dwReturn["PRGDATINV"] = " ".PadRight(8 ); 
         dwReturn["PRHKOLL"] = " ".PadRight(5 ); 
         dwReturn["PRHPRGRP"] = " ".PadRight(8 ); 
         dwReturn["PRHLFDNR"] = " ".PadRight(0 ); 
         dwReturn["PRWAEHRSL"] = " ".PadRight(3 ); 
         dwReturn["PRPREH"] = " ".PadRight(3 ); 
         dwReturn["PRSACHB"] = " ".PadRight(8 ); 
         dwReturn["PRABSP"] = " ".PadRight(0 ); 
         dwReturn["PRABSA"] = " ".PadRight(0 ); 
         dwReturn["PRABSART"] = " ".PadRight(3 ); 
         dwReturn["PRZUCP"] = " ".PadRight(0 ); 
         dwReturn["PRZUCA"] = " ".PadRight(0 ); 
         dwReturn["PRZUCART"] = " ".PadRight(3 ); 
         dwReturn["PRZUCRUND"] = " ".PadRight(0 ); 
         dwReturn["PRZURP"] = " ".PadRight(0 ); 
         dwReturn["PRZURA"] = " ".PadRight(0 ); 
         dwReturn["PRZURART"] = " ".PadRight(3 ); 
         dwReturn["PRZURRUND"] = " ".PadRight(0 ); 
         dwReturn["PRMIFRACHT"] = " ".PadRight(0 ); 
         dwReturn["PRZUFP"] = " ".PadRight(0 ); 
         dwReturn["PRZUFA"] = " ".PadRight(0 ); 
         dwReturn["PRZUFART"] = " ".PadRight(3 ); 
         dwReturn["PRMIMENGE"] = " ".PadRight(0 ); 
         dwReturn["PRMIME"] = " ".PadRight(3 ); 
         dwReturn["PRZUMP"] = " ".PadRight(0 ); 
         dwReturn["PRZUMA"] = " ".PadRight(0 ); 
         dwReturn["PRZUMART"] = " ".PadRight(3 ); 
         dwReturn["PRMIWERT"] = " ".PadRight(0 ); 
         dwReturn["PRZUWA"] = " ".PadRight(0 ); 
         dwReturn["PRZUWM"] = " ".PadRight(1 ); 
         dwReturn["PRSTME"] = " ".PadRight(3 ); 
         dwReturn["PRSTMENGE1"] = " ".PadRight(0 ); 
         dwReturn["PRSTMENGE2"] = " ".PadRight(0 ); 
         dwReturn["PRSTMENGE3"] = " ".PadRight(0 ); 
         dwReturn["PRSTMENGE4"] = " ".PadRight(0 ); 
         dwReturn["PRSTMENGE5"] = " ".PadRight(0 ); 
         dwReturn["PRGRPPREIS"] = " ".PadRight(1 ); 
         dwReturn["PRWAEHREH"] = " ".PadRight(0 ); 
         dwReturn["PRKURSWERT"] = " ".PadRight(9 ); 
         dwReturn["PRFAKTOR"] = " ".PadRight(18 ); 
         dwReturn["PRPREHGRP"] = " ".PadRight(1 ); 
         dwReturn["PRPREHFKT"] = " ".PadRight(12 ); 
         dwReturn["PRMIMEGRP"] = " ".PadRight(1 ); 
         dwReturn["PRMIMEFKT"] = " ".PadRight(12 ); 
         dwReturn["PRSTMEGRP"] = " ".PadRight(1 ); 
         dwReturn["PRSTMEFKT"] = " ".PadRight(12 ); 
         dwReturn["PRSTAFFELF"] = " ".PadRight(1 ); 
         dwReturn["PRVGBETRAG"] = " ".PadRight(0 ); 
         dwReturn["PRVRBETRAG"] = " ".PadRight(0 ); 
         dwReturn["PRZUABART"] = " ".PadRight(3 ); 
         dwReturn["PRVGMAXPROZ"] = " ".PadRight(0 ); 
         dwReturn["PRANZNK"] = " ".PadRight(1 ); 
         dwReturn["PRUGPROZ"] = " ".PadRight(1 ); 
         dwReturn["PRLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["PRLANDU"] = " ".PadRight(3 ); 
         dwReturn["PRPLZU"] = " ".PadRight(12 ); 
         dwReturn["PRORTU"] = " ".PadRight(40 ); 
         dwReturn["PRCOUNTYU"] = " ".PadRight(4 ); 
         dwReturn["PRCITYU"] = " ".PadRight(4 ); 
         dwReturn["PREXWVGL"] = " ".PadRight(1 ); 
         dwReturn["PRUGEXW"] = " ".PadRight(1 ); 
         dwReturn["PRFRACHT"] = " ".PadRight(0 ); 
         dwReturn["PRFRMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRVERSICH"] = " ".PadRight(0 ); 
         dwReturn["PRVERP"] = " ".PadRight(0 ); 
         dwReturn["PRVPMEEH"] = " ".PadRight(3 ); 
         dwReturn["PRZOLLKZ"] = " ".PadRight(1 ); 
         dwReturn["PRORTKZ"] = " ".PadRight(1 ); 
         dwReturn["PRZINSEN"] = " ".PadRight(0 ); 
         dwReturn["PRSTEUER"] = " ".PadRight(0 ); 
         dwReturn["PRPROV"] = " ".PadRight(0 ); 
         dwReturn["PRRESKZA"] = " ".PadRight(1 ); 
         dwReturn["PRRESKZB"] = " ".PadRight(1 ); 
         dwReturn["PRRESKZC"] = " ".PadRight(1 ); 
         dwReturn["PRRESKZD"] = " ".PadRight(1 ); 
         dwReturn["PRRESKZE"] = " ".PadRight(1 ); 
         dwReturn["PRFILLER"] = " ".PadRight(29 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapPRKOPF(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SavePRKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryPRKOPF(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapPRKOPF(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertPRKOPF(dwLocal, ITXDBVERSION);
            }
            UpdatePRKOPF(dwLocal);
        }
        public void InsertPRKOPF(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO PRKOPF(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryPRKOPF(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM PRKOPF WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM PRKOPF  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "PRKOPF";
            Return = Result;
            return Return;
        }
        public void DeletePRKOPF(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM PRKOPF   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdatePRKOPF(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE PRKOPF SET "
                    +"PRMANDANT= :PRMANDANT,"
                    +"PRKOLL= :PRKOLL,"
                    +"PRPRGRP= :PRPRGRP,"
                    +"PRLFDNR= :PRLFDNR,"
                    +"PRAENDZL= :PRAENDZL,"
                    +"PRAENDBEN= :PRAENDBEN,"
                    +"PRAENDDAT= :PRAENDDAT,"
                    +"PRNEUBEN= :PRNEUBEN,"
                    +"PRNEUDAT= :PRNEUDAT,"
                    +"PRGDATVON= :PRGDATVON,"
                    +"PRGDATBIS= :PRGDATBIS,"
                    +"PRGDATINV= :PRGDATINV,"
                    +"PRHKOLL= :PRHKOLL,"
                    +"PRHPRGRP= :PRHPRGRP,"
                    +"PRHLFDNR= :PRHLFDNR,"
                    +"PRWAEHRSL= :PRWAEHRSL,"
                    +"PRPREH= :PRPREH,"
                    +"PRSACHB= :PRSACHB,"
                    +"PRABSP= :PRABSP,"
                    +"PRABSA= :PRABSA,"
                    +"PRABSART= :PRABSART,"
                    +"PRZUCP= :PRZUCP,"
                    +"PRZUCA= :PRZUCA,"
                    +"PRZUCART= :PRZUCART,"
                    +"PRZUCRUND= :PRZUCRUND,"
                    +"PRZURP= :PRZURP,"
                    +"PRZURA= :PRZURA,"
                    +"PRZURART= :PRZURART,"
                    +"PRZURRUND= :PRZURRUND,"
                    +"PRMIFRACHT= :PRMIFRACHT,"
                    +"PRZUFP= :PRZUFP,"
                    +"PRZUFA= :PRZUFA,"
                    +"PRZUFART= :PRZUFART,"
                    +"PRMIMENGE= :PRMIMENGE,"
                    +"PRMIME= :PRMIME,"
                    +"PRZUMP= :PRZUMP,"
                    +"PRZUMA= :PRZUMA,"
                    +"PRZUMART= :PRZUMART,"
                    +"PRMIWERT= :PRMIWERT,"
                    +"PRZUWA= :PRZUWA,"
                    +"PRZUWM= :PRZUWM,"
                    +"PRSTME= :PRSTME,"
                    +"PRSTMENGE1= :PRSTMENGE1,"
                    +"PRSTMENGE2= :PRSTMENGE2,"
                    +"PRSTMENGE3= :PRSTMENGE3,"
                    +"PRSTMENGE4= :PRSTMENGE4,"
                    +"PRSTMENGE5= :PRSTMENGE5,"
                    +"PRGRPPREIS= :PRGRPPREIS,"
                    +"PRWAEHREH= :PRWAEHREH,"
                    +"PRKURSWERT= :PRKURSWERT,"
                    +"PRFAKTOR= :PRFAKTOR,"
                    +"PRPREHGRP= :PRPREHGRP,"
                    +"PRPREHFKT= :PRPREHFKT,"
                    +"PRMIMEGRP= :PRMIMEGRP,"
                    +"PRMIMEFKT= :PRMIMEFKT,"
                    +"PRSTMEGRP= :PRSTMEGRP,"
                    +"PRSTMEFKT= :PRSTMEFKT,"
                    +"PRSTAFFELF= :PRSTAFFELF,"
                    +"PRVGBETRAG= :PRVGBETRAG,"
                    +"PRVRBETRAG= :PRVRBETRAG,"
                    +"PRZUABART= :PRZUABART,"
                    +"PRVGMAXPROZ= :PRVGMAXPROZ,"
                    +"PRANZNK= :PRANZNK,"
                    +"PRUGPROZ= :PRUGPROZ,"
                    +"PRLIEFBED= :PRLIEFBED,"
                    +"PRLANDU= :PRLANDU,"
                    +"PRPLZU= :PRPLZU,"
                    +"PRORTU= :PRORTU,"
                    +"PRCOUNTYU= :PRCOUNTYU,"
                    +"PRCITYU= :PRCITYU,"
                    +"PREXWVGL= :PREXWVGL,"
                    +"PRUGEXW= :PRUGEXW,"
                    +"PRFRACHT= :PRFRACHT,"
                    +"PRFRMEEH= :PRFRMEEH,"
                    +"PRVERSICH= :PRVERSICH,"
                    +"PRVERP= :PRVERP,"
                    +"PRVPMEEH= :PRVPMEEH,"
                    +"PRZOLLKZ= :PRZOLLKZ,"
                    +"PRORTKZ= :PRORTKZ,"
                    +"PRZINSEN= :PRZINSEN,"
                    +"PRSTEUER= :PRSTEUER,"
                    +"PRPROV= :PRPROV,"
                    +"PRRESKZA= :PRRESKZA,"
                    +"PRRESKZB= :PRRESKZB,"
                    +"PRRESKZC= :PRRESKZC,"
                    +"PRRESKZD= :PRRESKZD,"
                    +"PRRESKZE= :PRRESKZE,"
                    +"PRFILLER= :PRFILLER,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("PRMANDANT", OracleType.NVarChar).Value = dwData["PRMANDANT"].ToString(); 
          or1.Parameters.Add("PRKOLL", OracleType.NVarChar).Value = dwData["PRKOLL"].ToString(); 
          or1.Parameters.Add("PRPRGRP", OracleType.NVarChar).Value = dwData["PRPRGRP"].ToString(); 
          or1.Parameters.Add("PRLFDNR", OracleType.NVarChar).Value = dwData["PRLFDNR"].ToString(); 
          or1.Parameters.Add("PRAENDZL", OracleType.NVarChar).Value = dwData["PRAENDZL"].ToString(); 
          or1.Parameters.Add("PRAENDBEN", OracleType.NVarChar).Value = dwData["PRAENDBEN"].ToString(); 
          or1.Parameters.Add("PRAENDDAT", OracleType.NVarChar).Value = dwData["PRAENDDAT"].ToString(); 
          or1.Parameters.Add("PRNEUBEN", OracleType.NVarChar).Value = dwData["PRNEUBEN"].ToString(); 
          or1.Parameters.Add("PRNEUDAT", OracleType.NVarChar).Value = dwData["PRNEUDAT"].ToString(); 
          or1.Parameters.Add("PRGDATVON", OracleType.NVarChar).Value = dwData["PRGDATVON"].ToString(); 
          or1.Parameters.Add("PRGDATBIS", OracleType.NVarChar).Value = dwData["PRGDATBIS"].ToString(); 
          or1.Parameters.Add("PRGDATINV", OracleType.NVarChar).Value = dwData["PRGDATINV"].ToString(); 
          or1.Parameters.Add("PRHKOLL", OracleType.NVarChar).Value = dwData["PRHKOLL"].ToString(); 
          or1.Parameters.Add("PRHPRGRP", OracleType.NVarChar).Value = dwData["PRHPRGRP"].ToString(); 
          or1.Parameters.Add("PRHLFDNR", OracleType.NVarChar).Value = dwData["PRHLFDNR"].ToString(); 
          or1.Parameters.Add("PRWAEHRSL", OracleType.NVarChar).Value = dwData["PRWAEHRSL"].ToString(); 
          or1.Parameters.Add("PRPREH", OracleType.NVarChar).Value = dwData["PRPREH"].ToString(); 
          or1.Parameters.Add("PRSACHB", OracleType.NVarChar).Value = dwData["PRSACHB"].ToString(); 
          or1.Parameters.Add("PRABSP", OracleType.NVarChar).Value = dwData["PRABSP"].ToString(); 
          or1.Parameters.Add("PRABSA", OracleType.NVarChar).Value = dwData["PRABSA"].ToString(); 
          or1.Parameters.Add("PRABSART", OracleType.NVarChar).Value = dwData["PRABSART"].ToString(); 
          or1.Parameters.Add("PRZUCP", OracleType.NVarChar).Value = dwData["PRZUCP"].ToString(); 
          or1.Parameters.Add("PRZUCA", OracleType.NVarChar).Value = dwData["PRZUCA"].ToString(); 
          or1.Parameters.Add("PRZUCART", OracleType.NVarChar).Value = dwData["PRZUCART"].ToString(); 
          or1.Parameters.Add("PRZUCRUND", OracleType.NVarChar).Value = dwData["PRZUCRUND"].ToString(); 
          or1.Parameters.Add("PRZURP", OracleType.NVarChar).Value = dwData["PRZURP"].ToString(); 
          or1.Parameters.Add("PRZURA", OracleType.NVarChar).Value = dwData["PRZURA"].ToString(); 
          or1.Parameters.Add("PRZURART", OracleType.NVarChar).Value = dwData["PRZURART"].ToString(); 
          or1.Parameters.Add("PRZURRUND", OracleType.NVarChar).Value = dwData["PRZURRUND"].ToString(); 
          or1.Parameters.Add("PRMIFRACHT", OracleType.NVarChar).Value = dwData["PRMIFRACHT"].ToString(); 
          or1.Parameters.Add("PRZUFP", OracleType.NVarChar).Value = dwData["PRZUFP"].ToString(); 
          or1.Parameters.Add("PRZUFA", OracleType.NVarChar).Value = dwData["PRZUFA"].ToString(); 
          or1.Parameters.Add("PRZUFART", OracleType.NVarChar).Value = dwData["PRZUFART"].ToString(); 
          or1.Parameters.Add("PRMIMENGE", OracleType.NVarChar).Value = dwData["PRMIMENGE"].ToString(); 
          or1.Parameters.Add("PRMIME", OracleType.NVarChar).Value = dwData["PRMIME"].ToString(); 
          or1.Parameters.Add("PRZUMP", OracleType.NVarChar).Value = dwData["PRZUMP"].ToString(); 
          or1.Parameters.Add("PRZUMA", OracleType.NVarChar).Value = dwData["PRZUMA"].ToString(); 
          or1.Parameters.Add("PRZUMART", OracleType.NVarChar).Value = dwData["PRZUMART"].ToString(); 
          or1.Parameters.Add("PRMIWERT", OracleType.NVarChar).Value = dwData["PRMIWERT"].ToString(); 
          or1.Parameters.Add("PRZUWA", OracleType.NVarChar).Value = dwData["PRZUWA"].ToString(); 
          or1.Parameters.Add("PRZUWM", OracleType.NVarChar).Value = dwData["PRZUWM"].ToString(); 
          or1.Parameters.Add("PRSTME", OracleType.NVarChar).Value = dwData["PRSTME"].ToString(); 
          or1.Parameters.Add("PRSTMENGE1", OracleType.NVarChar).Value = dwData["PRSTMENGE1"].ToString(); 
          or1.Parameters.Add("PRSTMENGE2", OracleType.NVarChar).Value = dwData["PRSTMENGE2"].ToString(); 
          or1.Parameters.Add("PRSTMENGE3", OracleType.NVarChar).Value = dwData["PRSTMENGE3"].ToString(); 
          or1.Parameters.Add("PRSTMENGE4", OracleType.NVarChar).Value = dwData["PRSTMENGE4"].ToString(); 
          or1.Parameters.Add("PRSTMENGE5", OracleType.NVarChar).Value = dwData["PRSTMENGE5"].ToString(); 
          or1.Parameters.Add("PRGRPPREIS", OracleType.NVarChar).Value = dwData["PRGRPPREIS"].ToString(); 
          or1.Parameters.Add("PRWAEHREH", OracleType.NVarChar).Value = dwData["PRWAEHREH"].ToString(); 
          or1.Parameters.Add("PRKURSWERT", OracleType.NVarChar).Value = dwData["PRKURSWERT"].ToString(); 
          or1.Parameters.Add("PRFAKTOR", OracleType.NVarChar).Value = dwData["PRFAKTOR"].ToString(); 
          or1.Parameters.Add("PRPREHGRP", OracleType.NVarChar).Value = dwData["PRPREHGRP"].ToString(); 
          or1.Parameters.Add("PRPREHFKT", OracleType.NVarChar).Value = dwData["PRPREHFKT"].ToString(); 
          or1.Parameters.Add("PRMIMEGRP", OracleType.NVarChar).Value = dwData["PRMIMEGRP"].ToString(); 
          or1.Parameters.Add("PRMIMEFKT", OracleType.NVarChar).Value = dwData["PRMIMEFKT"].ToString(); 
          or1.Parameters.Add("PRSTMEGRP", OracleType.NVarChar).Value = dwData["PRSTMEGRP"].ToString(); 
          or1.Parameters.Add("PRSTMEFKT", OracleType.NVarChar).Value = dwData["PRSTMEFKT"].ToString(); 
          or1.Parameters.Add("PRSTAFFELF", OracleType.NVarChar).Value = dwData["PRSTAFFELF"].ToString(); 
          or1.Parameters.Add("PRVGBETRAG", OracleType.NVarChar).Value = dwData["PRVGBETRAG"].ToString(); 
          or1.Parameters.Add("PRVRBETRAG", OracleType.NVarChar).Value = dwData["PRVRBETRAG"].ToString(); 
          or1.Parameters.Add("PRZUABART", OracleType.NVarChar).Value = dwData["PRZUABART"].ToString(); 
          or1.Parameters.Add("PRVGMAXPROZ", OracleType.NVarChar).Value = dwData["PRVGMAXPROZ"].ToString(); 
          or1.Parameters.Add("PRANZNK", OracleType.NVarChar).Value = dwData["PRANZNK"].ToString(); 
          or1.Parameters.Add("PRUGPROZ", OracleType.NVarChar).Value = dwData["PRUGPROZ"].ToString(); 
          or1.Parameters.Add("PRLIEFBED", OracleType.NVarChar).Value = dwData["PRLIEFBED"].ToString(); 
          or1.Parameters.Add("PRLANDU", OracleType.NVarChar).Value = dwData["PRLANDU"].ToString(); 
          or1.Parameters.Add("PRPLZU", OracleType.NVarChar).Value = dwData["PRPLZU"].ToString(); 
          or1.Parameters.Add("PRORTU", OracleType.NVarChar).Value = dwData["PRORTU"].ToString(); 
          or1.Parameters.Add("PRCOUNTYU", OracleType.NVarChar).Value = dwData["PRCOUNTYU"].ToString(); 
          or1.Parameters.Add("PRCITYU", OracleType.NVarChar).Value = dwData["PRCITYU"].ToString(); 
          or1.Parameters.Add("PREXWVGL", OracleType.NVarChar).Value = dwData["PREXWVGL"].ToString(); 
          or1.Parameters.Add("PRUGEXW", OracleType.NVarChar).Value = dwData["PRUGEXW"].ToString(); 
          or1.Parameters.Add("PRFRACHT", OracleType.NVarChar).Value = dwData["PRFRACHT"].ToString(); 
          or1.Parameters.Add("PRFRMEEH", OracleType.NVarChar).Value = dwData["PRFRMEEH"].ToString(); 
          or1.Parameters.Add("PRVERSICH", OracleType.NVarChar).Value = dwData["PRVERSICH"].ToString(); 
          or1.Parameters.Add("PRVERP", OracleType.NVarChar).Value = dwData["PRVERP"].ToString(); 
          or1.Parameters.Add("PRVPMEEH", OracleType.NVarChar).Value = dwData["PRVPMEEH"].ToString(); 
          or1.Parameters.Add("PRZOLLKZ", OracleType.NVarChar).Value = dwData["PRZOLLKZ"].ToString(); 
          or1.Parameters.Add("PRORTKZ", OracleType.NVarChar).Value = dwData["PRORTKZ"].ToString(); 
          or1.Parameters.Add("PRZINSEN", OracleType.NVarChar).Value = dwData["PRZINSEN"].ToString(); 
          or1.Parameters.Add("PRSTEUER", OracleType.NVarChar).Value = dwData["PRSTEUER"].ToString(); 
          or1.Parameters.Add("PRPROV", OracleType.NVarChar).Value = dwData["PRPROV"].ToString(); 
          or1.Parameters.Add("PRRESKZA", OracleType.NVarChar).Value = dwData["PRRESKZA"].ToString(); 
          or1.Parameters.Add("PRRESKZB", OracleType.NVarChar).Value = dwData["PRRESKZB"].ToString(); 
          or1.Parameters.Add("PRRESKZC", OracleType.NVarChar).Value = dwData["PRRESKZC"].ToString(); 
          or1.Parameters.Add("PRRESKZD", OracleType.NVarChar).Value = dwData["PRRESKZD"].ToString(); 
          or1.Parameters.Add("PRRESKZE", OracleType.NVarChar).Value = dwData["PRRESKZE"].ToString(); 
          or1.Parameters.Add("PRFILLER", OracleType.NVarChar).Value = dwData["PRFILLER"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
